﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SpriteSheetInfoScript : ScriptableObject
{
    public Texture2D tex;
    public Texture2D texAlpha;
    public TextAsset config;
    public Material spriteMat;
//    public Material uguiMat;
    public Material uiMat;
    public Sprite[] sprites;

//    private System.WeakReference texRef;
//    private System.WeakReference texAlphaRef;
//    private System.WeakReference spriteMatRef;
//    private System.WeakReference nguiMatRef;

//    public void UseWeakRef()
//    {
//        config = null;
//        texRef = new System.WeakReference(tex);
//        texAlphaRef = new System.WeakReference(texAlpha);
//        spriteMatRef = new System.WeakReference(spriteMat);
//        nguiMatRef = new System.WeakReference(nguiMat);
//    }

//    public int validMask()
//    {
//        return (texRef.IsAlive ? 1 : 0) | (texAlphaRef.IsAlive ? (1 << 1) : 0) | (spriteMatRef.IsAlive ? (1 << 2) : 0 | nguiMatRef.IsAlive ? (1 << 3) : 0);
//    }
}
